All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.java.swing.JDesktopPane

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----com.sun.java.swing.JComponent
                           |
                           +----com.sun.java.swing.JLayeredPane
                                   |
                                   +----com.sun.java.swing.JDesktopPane

public class JDesktopPane
extends JLayeredPane
implements Accessible
A container used to create a multiple-document interface or a virtual desktop. You create JInternalFrame objects and add them to the JDesktopPane. JDesktopPane extends JLayeredPane to manage the potentially overlapping internal frames. It also maintains a reference to an instance of DesktopManager that is set by the UI class for the current Look and Feel (L&F).

This class is normally used as the parent of JInternalFrames to provide a pluggable DesktopManager object to the JInternalFrames. The installUI of the L&F specific implementation is responsible for setting the desktopManager variable appropriately. When the parent of a JInternalFrame is a JDesktopPane, it should delegate most of its behavior to the desktopManager (closing, resizing, etc).

For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JDesktopPane key assignments.

Warning: serialized objects of this class will not be compatible with future swing releases. The current serialization support is appropriate for short term storage or RMI between Swing1.0 applications. It will not be possible to load serialized Swing1.0 objects with future releases of Swing. The JDK1.2 release of Swing will be the compatibility baseline for the serialized form of Swing objects.

See Also:
JInternalFrame, JDesktopIcon, DesktopManager

Constructor Index

 o JDesktopPane()
Creates a new JDesktopPane.

Method Index

 o getAccessibleContext()
Get the AccessibleContext associated with this JComponent
 o getAllFrames()
Returns all JInternalFrames currently displayed in the desktop.
 o getAllFramesInLayer(int)
Returns all JInternalFrames currently displayed in the specified layer of the desktop.
 o getDesktopManager()
Returns the DesktopManger that handles desktop-specific UI actions.
 o getUI()
Returns the L&F object that renders this component.
 o getUIClassID()
Returns the name of the L&F class that renders this component.
 o isOpaque()
Returns true to indicate that this component paints every pixel in its range.
 o setDesktopManager(DesktopManager)
Sets the DesktopManger that will handle desktop-specific UI actions.
 o setUI(DesktopPaneUI)
Sets the L&F object that renders this component.
 o updateUI()
Notification from the UIManager that the L&F has changed.

Constructors

 o JDesktopPane
 public JDesktopPane()
Creates a new JDesktopPane.

Methods

 o getUI
 public DesktopPaneUI getUI()
Returns the L&F object that renders this component.

Returns:
the DesktopPaneUI object that renders this component
 o setUI
 public void setUI(DesktopPaneUI ui)
Sets the L&F object that renders this component.

Parameters:
ui - the DesktopPaneUI L&F object
See Also:
getUI
 o getDesktopManager
 public DesktopManager getDesktopManager()
Returns the DesktopManger that handles desktop-specific UI actions.

Parameters:
d - the DesktopManager currently in use
 o setDesktopManager
 public void setDesktopManager(DesktopManager d)
Sets the DesktopManger that will handle desktop-specific UI actions.

Parameters:
d - the DesktopManager to use
 o updateUI
 public void updateUI()
Notification from the UIManager that the L&F has changed. Replaces the current UI object with the latest version from the UIManager.

Overrides:
updateUI in class JComponent
See Also:
updateUI
 o getUIClassID
 public String getUIClassID()
Returns the name of the L&F class that renders this component.

Returns:
"DesktopPaneUI"
Overrides:
getUIClassID in class JComponent
See Also:
getUIClassID, getUI
 o getAllFrames
 public JInternalFrame[] getAllFrames()
Returns all JInternalFrames currently displayed in the desktop. Returns iconified frames as well as expanded frames.

Returns:
an array of JInternalFrame objects
 o getAllFramesInLayer
 public JInternalFrame[] getAllFramesInLayer(int layer)
Returns all JInternalFrames currently displayed in the specified layer of the desktop. Returns iconified frames as well expanded frames.

Parameters:
layer - an int specifying the desktop layer
Returns:
an array of JInternalFrame objects
See Also:
JLayeredPane
 o isOpaque
 public boolean isOpaque()
Returns true to indicate that this component paints every pixel in its range. (In other words, it does not have a transparent background or foreground.)

Returns:
true
Overrides:
isOpaque in class JComponent
See Also:
isOpaque
 o getAccessibleContext
 public AccessibleContext getAccessibleContext()
Get the AccessibleContext associated with this JComponent

Returns:
the AccessibleContext of this JComponent
Overrides:
getAccessibleContext in class JLayeredPane

All Packages  Class Hierarchy  This Package  Previous  Next  Index